using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class GL_SourceMap : EntityTypeConfiguration<GL_Source>
    {
        public GL_SourceMap()
        {
            // Primary Key
            this.HasKey(t => t.GL_Source_ID);

            // Properties
            this.Property(t => t.GL_Source_Name)
                .HasMaxLength(50);

            this.Property(t => t.GL_Source_Code)
                .HasMaxLength(4);

            // Table & Column Mappings
            this.ToTable("GL_Source");
            this.Property(t => t.GL_Source_ID).HasColumnName("GL_Source_ID");
            this.Property(t => t.GL_Source_Name).HasColumnName("GL_Source_Name");
            this.Property(t => t.GL_Source_Code).HasColumnName("GL_Source_Code");
        }
    }
}
